package org.dromara.system.domain.bo;

import org.dromara.system.domain.SysStoreArea;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.util.List;

/**
 * 系统管理-店内分区配置业务对象 sys_store_area
 *
 * @author LionLi
 * @date 2024-03-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysStoreArea.class, reverseConvertGenerate = false)
public class SysStoreAreaBo extends BaseEntity {

    /**
     * 店内分区id
     */
    @NotNull(message = "店内分区id不能为空", groups = { EditGroup.class })
    private Long storeAreaId;

    /**
     * 父级id（sys_store表门店id，当类型为通道且是外围时需要带入门店id，否则为null）
     */
    private Long parentId;

    /**
     * 门店id
     */
    @NotNull(message = "门店id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long storeId;

    /**
     * 店内分区编号
     */
    @NotBlank(message = "店内分区编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String storeAreaCode;

    /**
     * 店内分区名称
     */
    @NotBlank(message = "店内分区名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String storeAreaName;

    /**
     * 店内分区类型（字典表：0分区 1通道 2楼层）
     */
    @NotBlank(message = "店内分区类型（字典表：0分区 1通道 2楼层）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String storeAreaType;

    /**
     * 是否外围（字典表：0是 1否）
     */
    @NotBlank(message = "是否外围（字典表：0是 1否）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String isChannel;

    /**
     * 营业状态（字典表：IN_BUSINESS运行 SUSPEND暂停 CLOSING关闭）
     */
    @NotBlank(message = "营业状态（字典表：IN_BUSINESS运行 SUSPEND暂停 CLOSING关闭）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 店内分区配置的设备数量
     */
    private List<String> deviceIds;

}
